package com.example.whm.model;





import java.io.Serializable;
import java.util.Date;

public class Entity implements Serializable{
	
	private static final long serialVersionUID = 1523277164157276472L;

	String id;
	String name;	
	String pre_pic;
	int price;
	int like_num;
	String createtime=new Date().toLocaleString();
long timemils=new Date().getTime(); 
	
	
	
	
	
	
	public long getTimemils() {
		return timemils;
	}
	public void setTimemils(long timemils) {
		this.timemils = timemils;
	}
	
	
	
	
	
	
	

	public int getLike_num() {
		return like_num;
	}



	public void setLike_num(int like_num) {
		this.like_num = like_num;
	}



	public String getPre_pic() {
		return pre_pic;
	}



	public void setPre_pic(String pre_pic) {
		this.pre_pic = pre_pic;
	}





	public int getPrice() {
		return price;
	}



	public void setPrice(int price) {
		this.price = price;
	}


	public String getCreatetime() {
		return createtime;
	}



	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}







	public String getId() {
		return id;
	}



	public void setId(String id) {
		this.id = id;
	}



	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	
	public Entity() {
		super();
		// TODO Auto-generated constructor stub
	}

	/*@Override
	public boolean containsField(String arg0) {
		// TODO Auto-generated method stub
		//System.out.println("1");
		//System.out.println(arg0);
		return false;
	}

	@Override
	@Deprecated
	public boolean containsKey(String arg0) {
		// TODO Auto-generated method stub
		//System.out.println("2");
		return false;
	}

	@Override
	public Object get(String arg0) {
		// TODO Auto-generated method stub
		//System.out.println("3");
		//System.out.println(arg0);
		return null;
	}

	@Override
	public Set<String> keySet() {
		// TODO Auto-generated method stub
		//System.out.println("4");
		return null;
	}

	@Override
	public Object put(String arg0, Object arg1) {
		
		// TODO Auto-generated method stub
		//System.out.println("==================");
		if (arg0.endsWith("_id")) {
			setId(((ObjectId)arg1).toString()); 
		}
		if (arg0.endsWith("pre_pic")) {
			setPre_pic((String)arg1);
		}
		if (arg0.endsWith("follow_num")) {
			setFollow_num((Integer)arg1);
		}
		if (arg0.endsWith("pics")) {
			setPics((String)arg1);
		}
		if (arg0.endsWith("sell_pri")) {
			setSell_pri((Integer)arg1);
		}
		if (arg0.endsWith("sell_num")) {
			setSell_num((Integer)arg1);
		}
		if (arg0.endsWith("price")) {
			setPrice(Integer.valueOf((String)arg1));
		}
		if (arg0.endsWith("order1_num")) {
			setOrder1_num((Integer)arg1);
		}
		if (arg0.endsWith("order0_num")) {
			setOrder0_num((Integer)arg1);
		}
		if (arg0.endsWith("name")) {
			setName((String)arg1);
		}
		if (arg0.endsWith("state")) {
			setState((Integer)arg1);
		}
		if (arg0.endsWith("like_num")) {
			setLike_num((Integer)arg1);
		}
		if (arg0.endsWith("note")) {
			setNote((String)arg1);
		}
		if (arg0.endsWith("sub_num")) {
			setSub_num((Integer)arg1);
		}
		if (arg0.endsWith("createtime")) {
			
			setCreatetime(((Date)arg1).toLocaleString());
		}
		return null;
	}

	@Override
	public void putAll(BSONObject arg0) {
		// TODO Auto-generated method stub
		System.out.println("6");
	}

	@Override
	public void putAll(Map arg0) {
		// TODO Auto-generated method stub
		System.out.println("7");
	}

	@Override
	public Object removeField(String arg0) {
		// TODO Auto-generated method stub
		System.out.println("8");
		return null;
	}

	@Override
	public Map toMap() {
		// TODO Auto-generated method stub
		System.out.println("9");
		return null;
	}

	@Override
	public boolean isPartialObject() {
		// TODO Auto-generated method stub
		System.out.println("10");
		return false;
	}

	@Override
	public void markAsPartialObject() {
		// TODO Auto-generated method stub
		System.out.println("11");
	}*/

}
